//
//  VideoTransform.h
//  OneToOne
//
//  Created by ByteDance on 2023/3/24.
//

#import <Foundation/Foundation.h>
#import <Accelerate/Accelerate.h>
#import <VideoToolbox/VideoToolbox.h>
#import <AVFoundation/AVAssetWriterInput.h>
#import <CoreImage/CoreImage.h>
#import <UIKit/UIImage.h>
NS_ASSUME_NONNULL_BEGIN

@interface VideoTransform : NSObject
+ (CMSampleBufferRef)sampleBufferFromPixelBuffer:(CVPixelBufferRef)pixelBuffer;
+ (CMSampleBufferRef)sampleBufferFromUIImage:(UIImage *)image;
+ (NSData *)encodeSampleBuffer:(CMSampleBufferRef)sampleBuffer;
+ (UIImage *)imageFromSampleBuffer:(CMSampleBufferRef)sampleBuffer orientation:(UIImageOrientation)orientation;
@end

NS_ASSUME_NONNULL_END
